// Type: System.Web.UI.Control
// Assembly: System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// Assembly location: C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.dll

using System;
using System.Collections;
using System.ComponentModel;
using System.ComponentModel.Design.Serialization;
using System.IO;
using System.Runtime;
using System.Web;
using System.Web.Routing;
using System.Web.UI.Adapters;

namespace System.Web.UI
{
    [ToolboxItem(
        "System.Web.UI.Design.WebControlToolboxItem, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
        )]
    [DesignerCategory("Code")]
    [Designer(
        "System.Web.UI.Design.ControlDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
        )]
    [DesignerSerializer(
        "Microsoft.VisualStudio.Web.WebForms.ControlCodeDomSerializer, Microsoft.VisualStudio.Web, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
        ,
        "System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
        )]
    [Bindable(true)]
    [DefaultProperty("ID")]
    [Themeable(false)]
    [ToolboxItemFilter("System.Web.UI", ToolboxItemFilterType.Require)]
    public class Control : IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor,
                           IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor
    {
        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public Control();

        [DefaultValue(0)]
        [Themeable(false)]
        public virtual ClientIDMode ClientIDMode { [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        get; set; }

        [Browsable(false)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public virtual string ClientID { get; }

        protected char ClientIDSeparator { get; }

        [Browsable(false)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        protected internal virtual HttpContext Context { [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        get; }

        protected ControlAdapter Adapter { get; }
        protected internal bool DesignMode { get; }

        protected EventHandlerList Events { [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        get; }

        [ParenthesizePropertyName(true)]
        [MergableProperty(false)]
        [Filterable(false)]
        [Themeable(false)]
        public virtual string ID { get; set; }

        [Browsable(false)]
        [DefaultValue(true)]
        [Themeable(false)]
        public virtual bool EnableTheming { get; set; }

        protected internal bool IsChildControlStateCleared { get; }

        [Filterable(false)]
        [Browsable(false)]
        [DefaultValue("")]
        public virtual string SkinID { get; set; }

        [DefaultValue(true)]
        [Themeable(false)]
        public virtual bool EnableViewState { get; [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        set; }

        [DefaultValue(0)]
        [Themeable(false)]
        public virtual ViewStateMode ViewStateMode { get; set; }

        protected internal bool IsViewStateEnabled { get; }

        [Bindable(false)]
        [Browsable(false)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public virtual Control NamingContainer { get; }

        [EditorBrowsable(EditorBrowsableState.Never)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        [Bindable(false)]
        [Browsable(false)]
        public Control BindingContainer { get; }

        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        [EditorBrowsable(EditorBrowsableState.Never)]
        [Bindable(false)]
        [Browsable(false)]
        public Control DataItemContainer { get; }

        [EditorBrowsable(EditorBrowsableState.Never)]
        [Bindable(false)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        [Browsable(false)]
        public Control DataKeysContainer { get; }

        protected char IdSeparator { [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        get; }

        protected bool LoadViewStateByID { get; }

        [Bindable(false)]
        [Browsable(false)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public virtual Page Page { get; set; }

        [Bindable(false)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        [Browsable(false)]
        public virtual Version RenderingCompatibility { get; set; }

        [Bindable(false)]
        [Browsable(false)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public TemplateControl TemplateControl { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        get; [EditorBrowsable(EditorBrowsableState.Never)]
        set; }

        [Browsable(false)]
        [Bindable(false)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public virtual Control Parent { [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        get; }

        [Browsable(false)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public virtual string TemplateSourceDirectory { get; }

        [Browsable(false)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        [EditorBrowsable(EditorBrowsableState.Advanced)]
        public string AppRelativeTemplateSourceDirectory { get; [EditorBrowsable(EditorBrowsableState.Never)]
        set; }

        [DefaultValue(true)]
        [Bindable(true)]
        public virtual bool Visible { get; set; }

        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        [Browsable(false)]
        public virtual string UniqueID { get; }

        protected bool HasChildViewState { get; }

        [Browsable(false)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public virtual ControlCollection Controls { get; }

        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        [Browsable(false)]
        protected virtual StateBag ViewState { get; }

        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        [Browsable(false)]
        protected virtual bool ViewStateIgnoresCase { [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        get; }

        protected bool ChildControlsCreated { get; set; }
        protected bool IsTrackingViewState { get; }

        #region IComponent Members

        public virtual void Dispose();

        [EditorBrowsable(EditorBrowsableState.Advanced)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        [Browsable(false)]
        public ISite Site { get; set; }

        public event EventHandler Disposed;

        #endregion

        #region IControlBuilderAccessor Members

        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        [Browsable(false)]
        ControlBuilder IControlBuilderAccessor.ControlBuilder { get; }

        #endregion

        #region IControlDesignerAccessor Members

        [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        IDictionary IControlDesignerAccessor.GetDesignModeState();

        [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        void IControlDesignerAccessor.SetDesignModeState(IDictionary data);

        void IControlDesignerAccessor.SetOwnerControl(Control owner);
        IDictionary IControlDesignerAccessor.UserData { get; }

        #endregion

        #region IDataBindingsAccessor Members

        bool IDataBindingsAccessor.HasDataBindings { get; }
        DataBindingCollection IDataBindingsAccessor.DataBindings { get; }

        #endregion

        #region IExpressionsAccessor Members

        bool IExpressionsAccessor.HasExpressions { get; }
        ExpressionBindingCollection IExpressionsAccessor.Expressions { get; }

        #endregion

        #region IParserAccessor Members

        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        void IParserAccessor.AddParsedSubObject(object obj);

        #endregion

        #region IUrlResolutionService Members

        public string ResolveClientUrl(string relativeUrl);

        #endregion

        protected virtual ControlAdapter ResolveAdapter();

        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        protected bool HasEvents();

        public string GetRouteUrl(object routeParameters);
        public string GetRouteUrl(string routeName, object routeParameters);

        [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        public string GetRouteUrl(RouteValueDictionary routeParameters);

        public string GetRouteUrl(string routeName, RouteValueDictionary routeParameters);
        public string GetUniqueIDRelativeTo(Control control);

        [EditorBrowsable(EditorBrowsableState.Advanced)]
        public virtual void ApplyStyleSheetSkin(Page page);

        protected virtual void OnDataBinding(EventArgs e);

        [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        public virtual void DataBind();

        protected virtual void DataBind(bool raiseOnDataBinding);
        protected virtual void DataBindChildren();

        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        protected virtual void AddParsedSubObject(object obj);

        protected void EnsureID();
        protected internal virtual void OnInit(EventArgs e);
        protected void ClearChildState();
        protected void ClearChildControlState();
        protected void ClearChildViewState();
        protected void ClearEffectiveClientIDMode();
        protected void ClearCachedClientID();
        public virtual void Focus();
        protected internal virtual void LoadControlState(object savedState);
        protected virtual void LoadViewState(object savedState);
        protected internal string MapPathSecure(string virtualPath);
        protected internal Stream OpenFile(string path);
        protected internal virtual void OnLoad(EventArgs e);
        protected internal virtual void OnPreRender(EventArgs e);
        protected void BuildProfileTree(string parentId, bool calcViewState);
        protected internal virtual object SaveControlState();
        protected virtual object SaveViewState();

        [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        protected internal virtual void Render(HtmlTextWriter writer);

        protected internal virtual void RenderChildren(HtmlTextWriter writer);

        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        public virtual void RenderControl(HtmlTextWriter writer);

        protected void RenderControl(HtmlTextWriter writer, ControlAdapter adapter);
        protected internal virtual void OnUnload(EventArgs e);
        protected void RaiseBubbleEvent(object source, EventArgs args);
        protected virtual bool OnBubbleEvent(object source, EventArgs args);
        protected internal virtual void AddedControl(Control control, int index);
        protected virtual ControlCollection CreateControlCollection();

        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        protected internal virtual void CreateChildControls();

        public string ResolveUrl(string relativeUrl);

        [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
        public virtual Control FindControl(string id);

        protected virtual Control FindControl(string id, int pathOffset);
        protected virtual IDictionary GetDesignModeState();
        public virtual bool HasControls();
        protected bool IsLiteralContent();

        [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
        protected virtual void TrackViewState();

        protected virtual void EnsureChildControls();
        protected internal virtual void RemovedControl(Control control);
        protected virtual void SetDesignModeState(IDictionary data);

        [EditorBrowsable(EditorBrowsableState.Advanced)]
        public void SetRenderMethodDelegate(RenderMethod renderMethod);

        public event EventHandler DataBinding;
        public event EventHandler Init;
        public event EventHandler Load;
        public event EventHandler PreRender;
        public event EventHandler Unload;
    }
}
